package com.probiz.estore.product.service.impl;

import java.util.List;

import com.probiz.estore.common.model.product.ProductTypeBrand;
import com.probiz.estore.core.service.impl.GenericManagerImpl;
import com.probiz.estore.product.dao.ProductTypeBrandDao;
import com.probiz.estore.product.service.ProductTypeBrandManager;


/**
 * Manager implementation for ProductTypeBrand, responsible for business processing, and communicate between web and persistence layer.
 */
public class ProductTypeBrandManagerImpl extends GenericManagerImpl<ProductTypeBrand> implements ProductTypeBrandManager {

	private ProductTypeBrandDao productTypeBrandDao = null;

	/**
	 * @param productTypeBrandDao
	 *            the productTypeBrandDao to set
	 */
	public void setProductTypeBrandDao(ProductTypeBrandDao productTypeBrandDao) {
		this.productTypeBrandDao = productTypeBrandDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.service.impl.GenericManagerImpl#init()
	 */
	@Override
	protected void initManager() {
		dao = productTypeBrandDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.service.impl.GenericManagerImpl#preDelete(java.lang.Object)
	 */
	@Override
	protected void preDelete(ProductTypeBrand entity) {

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.service.impl.GenericManagerImpl#preSave(java.lang.Object)
	 */
	@Override
	protected void preSave(ProductTypeBrand entity) {

	}

	/*
	 * (non-Javadoc)
	 * @see com.probiz.estore.catalog.service.ProductTypeBrandManager#findByProductType(java.lang.Integer)
	 */
	public List<ProductTypeBrand> findByProductType(Integer productTypeId) {
		return listByProperty("productType.productTypeId", productTypeId);
	}

}
